﻿// See https://aka.ms/new-console-template for more information

using DBUtility.Standard;

Console.WriteLine("Hello, World!");

/*
ProviderName的值
PostgreSql：System.Data.PostgreSql
SqlServer：Microsoft.Data.SqlClient
MySql：MySql.Data.MySqlClient
Oracle：System.Data.OracleClient
PostgreSQL：System.Data.PostgreSQL
OleDb：System.Data.OleDb
*/

ConfigHelper configHelper = new ConfigHelper("config");
string connectionName = "ConnectionStrings:DefaultConnection";
string connectionString = configHelper.Get(connectionName + ":ConnectionString");
string providerName = configHelper.Get(connectionName + ":ProviderName");


var isNetCore = AssemblyHelper.IsNetCore();

IDBHelper _idbHelper = DBHelperFactory.CreateInstance(connectionString, providerName);//创建接口//IDBHelper的实例